/**
 * 
 */
package com.haizhi.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Service;

import com.haizhi.bean.TbProduct;
import com.haizhi.bean.TbUser;
import com.haizhi.dao.ProductDao;
import com.haizhi.service.ProductService;

/**
 * @author jiangjintai
 *
 */
@Service("productService")
public class ProductServiceImpl extends BaseServiceImpl<TbProduct,Integer> implements
		ProductService {
	@Autowired
	ProductDao productDao;
	/* （非 Javadoc）
	 * @see com.haizhi.service.impl.BaseServiceImpl#getDao()
	 */
	@Override
	protected JpaRepository<TbProduct, Integer> getDao() {
		//
		return productDao;
	}
	/* （非 Javadoc）
	 * @see com.haizhi.service.ProductService#findByProductIsExcellent(int, org.springframework.data.domain.Pageable)
	 */
	@Override
	public Page<TbProduct> findByProductIsExcellent(int i, Pageable pageAble) {
		// 
		return this.productDao.findByProductIsExcellent(i,pageAble);
	}
	/* （非 Javadoc）
	 * @see com.haizhi.service.ProductService#findByTbUser(com.haizhi.bean.TbUser, org.springframework.data.domain.Pageable)
	 */
	@Override
	public Page<TbProduct> findByTbUser(TbUser tbUser, Pageable pageAble) {
		// 
		return this.productDao.findByTbUser(tbUser,pageAble);
	}

	
}
